/**
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
* This file is a part of the CANN Open Software.
* Licensed under CANN Open Software License Agreement Version 1.0 (the "License").
* Please refer to the License for details. You may not use this file except in compliance with the License.
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
* See LICENSE in the root of the software repository for the full text of the License.
*/
/*!
* \file matmul_policy.h
* \brief
*/
#ifndef IMPL_MATMUL_MODULES_MATMUL_POLICY_H_
#define IMPL_MATMUL_MODULES_MATMUL_POLICY_H_

#include "feature_trait/matmul_feature_trait.h"
#include "stage/copy_cube_out/copy_cube_out.h"
#include "resource/cube_in_buffer/cube_in_buffer.h"
#include "resource/cube_out_buffer/cube_out_buffer.h"
#include "stage/copy_cube_in/copy_cube_in.h"
#include "context/context.h"

namespace matmul {

template <const auto& MM_CFG, typename IMPL, typename A_TYPE, typename B_TYPE, typename C_TYPE, typename BIAS_TYPE>
struct MatmulPolicy
{
public:
    using L0cT = typename GetDstType<typename A_TYPE::T>::Type;
    using Context = matmul::MatmulContext<IMPL, MM_CFG>;
    using CubeOutBuffer = matmul::CubeOutBuffer<IMPL, L0cT, MM_CFG>;
    using CopyCubeOut = matmul::CopyCubeOut<IMPL, A_TYPE, B_TYPE, C_TYPE, MM_CFG,
        matmul::MatmulFeatureTrait<MM_CFG>::GetCubeOutType()>;
    using CopyCubeInA = CopyCubeIn<IMPL, MatmulInputAType<A_TYPE, typename A_TYPE::T>, MM_CFG>;
    using CopyCubeInB = CopyCubeIn<IMPL, MatmulInputBType<B_TYPE, typename A_TYPE::T>, MM_CFG>;
    using CubeInBufferA = CubeInBuffer<IMPL, MatmulInputAType<A_TYPE, typename A_TYPE::T>, MM_CFG>;
    using CubeInBufferB = CubeInBuffer<IMPL, MatmulInputBType<B_TYPE, typename A_TYPE::T>, MM_CFG>;
};
}
#endif // _MATMUL_POLICY_H_
